<?php

$query = "select CE.nom_Equipo as EQUIPO,((TG.j_Ganados * 3) + TG.j_Empatados) as PTS,(TG.g_Favor - TG.g_Contra) as DIF from Tab_General as TG inner join Cat_Equipos as CE on TG.id_Equipo=CE.id_Equipo where CE.id_Fuerza=2 order by PTS desc,DIF desc limit 8";
$result = mysql_query($query);
echo "<tr>";
echo "<td><font face=\"verdana\">" .
 mysql_result($result, 0, "EQUIPO") . "</font></td>";
echo "<td><font face=\"verdana\"> - </font></td>";
echo "<td><font face=\"verdana\"> VS </font></td>";
echo "<td><font face=\"verdana\"> - </font></td>";
echo "<td><font face=\"verdana\">" .
 mysql_result($result, 7, "EQUIPO") . "</font></td>";
/* echo "<td><font face=\"verdana\"> - </font></td>";
  echo "<td><font face=\"verdana\"> - </font></td></tr>"; */
echo "<tr>";

echo "<tr>";
echo "<td><font face=\"verdana\">" .
 mysql_result($result, 1, "EQUIPO") . "</font></td>";
echo "<td><font face=\"verdana\"> - </font></td>";
echo "<td><font face=\"verdana\"> VS </font></td>";
echo "<td><font face=\"verdana\"> - </font></td>";
echo "<td><font face=\"verdana\">" .
 mysql_result($result, 6, "EQUIPO") . "</font></td>";
/* echo "<td><font face=\"verdana\"> - </font></td>";
  echo "<td><font face=\"verdana\"> - </font></td>"; */
echo "<tr>";

echo "<tr>";
echo "<td><font face=\"verdana\">" .
 mysql_result($result, 2, "EQUIPO") . "</font></td>";
echo "<td><font face=\"verdana\"> - </font></td>";
echo "<td><font face=\"verdana\"> VS </font></td>";
echo "<td><font face=\"verdana\"> - </font></td>";
echo "<td><font face=\"verdana\">" .
 mysql_result($result, 5, "EQUIPO") . "</font></td>";
/* echo "<td><font face=\"verdana\"> - </font></td>";
  echo "<td><font face=\"verdana\"> - </font></td></tr>"; */
echo "<tr>";

echo "<tr>";
echo "<td><font face=\"verdana\">" .
 mysql_result($result, 3, "EQUIPO") . "</font></td>";
echo "<td><font face=\"verdana\"> - </font></td>";
echo "<td><font face=\"verdana\"> VS </font></td>";
echo "<td><font face=\"verdana\"> - </font></td>";
echo "<td><font face=\"verdana\">" .
 mysql_result($result, 4, "EQUIPO") . "</font></td>";
/* echo "<td><font face=\"verdana\"> - </font></td>";
  echo "<td><font face=\"verdana\"> - </font></td></tr>"; */
echo "<tr>";

mysql_free_result($result);
mysql_close($link);
?>